
       org $800
; even parity bit check.
       clr.b d0  ; logic 1 counter
       move.w #7,d1   ; loop counter
       move.b data,d2
       move.b d2,d3
shift  lsr.b #1,d2
       bcc loop
       add.b #1,d0
loop   dbra d1,shift
       lsr.b #1,d0
       bcc even
       or.b #$80,d3
       bra copy
even   and.b #$7f,d3
copy   move.b d3,data
finish  nop

          org $b00

data     ds.b 1

0001 0001



